home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1999 #2 / Amiga Plus CD - 1999 - No. 2.iso / Magazin / LibGuide / MyConvert.rexx < prev    next >
OS/2 REXX Batch file  |  1998-10-17  |  1KB  |  33 lines

  1. /*************************************************
  2.  * myConvert.rexx to split check1 to System dir  *
  3.  * V1.2 © Heiko Schröder 10/98                   *
  4.  *************************************************
  5.  *                                               *
  6.  * 1.2 - kontrolliert auch ..._020 usw           *
  7.  * 1.1 - Bug behoben, wenn kein Version String   *
  8.  *       gefunden wurde                          *
  9.  * 1.0 - erstes Release, um auch Files die nicht *
  10.  *       im Systempfad liegen, checken zu können *
  11.  *************************************************/
  12.  
  13. Parse ARG temp
  14.  
  15. check1=temp; tempo=temp
  16. Trennung=max(index(tempo,":"),lastpos("/",tempo))
  17. tempo=Delstr(tempo,1,Trennung)
  18.  
  19. /* Version abschneiden, wenn nicht, dann "no_versionstring" hinzu */
  20. pos1  =lastpos(" ",tempo)
  21. If pos1~=0 then check1=Delstr(tempo,pos1)
  22. else do
  23.    temp =temp||" no_versionstring"
  24.    address command '"SetEnv" check1='temp
  25.    check1=tempo
  26. end
  27.  
  28. poss=pos(".library",check1)
  29. check1=Left(check1,poss+7)
  30. address command '"SetEnv" file='check1
  31. address command '"SetEnv" checktemp1='temp
  32. Exit
  33.